package com.yidian.controller.business;

import com.alibaba.dubbo.config.annotation.Reference;
import com.yidian.server.goods.SkuService;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author whb
 * @create 2021-06-22 17:47
 * @desciption Sku控制类（面对前台页面）
 */
@RestController
@RequestMapping("/sku")
@CrossOrigin
public class SkuController {
    @Reference
    private SkuService skuService;

    @GetMapping("/price")
    public Integer findPriceFromRedis(String skuId){
        return skuService.findPriceFromRedis(skuId);
    }
}
